package com.gitee.wsl.compose.ext.flow

import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.flowWithLifecycle
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext


//@Composable
//fun <T> StateFlow<T>.collectAsStateValue(
//    context: CoroutineContext = Dispatchers.Default,
//): T = collectAsState(context).value
//
//@Composable
//fun <T : R, R> Flow<T>.collectAsStateValue(
//    initial: R,
//    context: CoroutineContext = Dispatchers.Default,
//): R = collectAsState(initial, context).value


